package jmu.time.time;

public class Time {

	public static String getTime(int seconds) {
		Integer hours = seconds / 3600;
		Integer minutes = seconds / 60;
		Integer second = seconds % 60;
		String time = "";
		if (minutes >= 60)
			minutes %= 60;
		if (hours < 10)
			time += "0" + hours + " : ";
		else
			time += hours + " : ";
		if (minutes < 10)
			time += "0" + minutes + " : ";
		else
			time += minutes + " : ";
		if (second < 10)
			time += "0" + second;
		else
			time += second;
		return time;
	}

	public static Integer getSeconds(Integer hours, Integer minutes, Integer seconds) {
		return hours * 3600 + minutes * 60 + seconds;
	}

}
